home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swags_z.zip / SCREEN.SWG / 0035_Set-Get Active Video Page.pas < prev    next >
Pascal/Delphi Source File  |  1993-11-02  |  1KB  |  54 lines

  1. {
  2. Robert Rothenburg
  3.  
  4. > How do you use video pages, how do you change the current one(I guess
  5. > it's an register?), and if somebody could, explain to me exactly what
  6. > Video Pages are?
  7.  
  8. Interrupt $10, function 5...which in Turbo Pascal becomes (ta da!):
  9. }
  10.  
  11. program PageExample;
  12.  
  13. uses
  14.   DOS;
  15.  
  16. var
  17.   reg : Registers;
  18.  
  19. procedure SetActivePage(Page : byte);
  20. begin
  21.   Reg.AH := 5;
  22.   Reg.AL := Page;
  23.   Intr($10, Reg);
  24. end;
  25.  
  26. (* or, if you've got TP 7... *)
  27.  
  28. procedure SetActivePage(Page : byte); assembler;
  29. asm
  30.   MOV AH, 5
  31.   MOV AL, Page
  32.   INT $10
  33. end;
  34.  
  35. {
  36. According to my handy and well-worn "DOS Programmer's Reference", the
  37. valid page numbers are as follows:
  38.  
  39. Page Numbers:        Video Mode(s):        Video Adapters:
  40. -----------------------------------------------------------------
  41.    0..7               00, 01                 CGA, EGA, MCGA, VGA
  42.    0..3               02, 03                 CGA
  43.    0..7               02, 03                 EGA, MCGA, VGA
  44.    0..7               07, 0Dh                EGA, VGA
  45.    0..3               0Eh                     "    "
  46.    0..1               0Fh, 10h                "    "
  47.  
  48. Of course my edition was written in 1989 and only goes up to DOS 4 and
  49. doesn't mention SVGA or XGA cards etc.
  50.  
  51. (I don't even bother with Boreland's BGI drivers.  It's much easier to
  52. use my own BIOS interface units.)
  53. }
  54.